/* gm_statusbar.js.php <?php
#   --------------------------------------------------------------
#   gm_statusbar.js.php 2011-01-24 gambio
#   Gambio GmbH
#   http://www.gambio.de
#   Copyright (c) 2011 Gambio GmbH
#   Released under the GNU General Public License
#   --------------------------------------------------------------
?>*/
/*<?php
if(is_object($GLOBALS['coo_debugger']) == true && $GLOBALS['coo_debugger']->is_enabled('uncompressed_js') == false)
{
?>*/
t_php_helper='<?php $gmStatusbar = MainFactory::create_object("GMStatusbar"); $gm_statusbar_cat = $_GET["cPath"]; if(strpos($gm_statusbar_cat, "_") !== false) $gm_statusbar_cat = substr(strrchr($gm_statusbar_cat, "_"), 1, strlen($gm_statusbar_cat)); $gm_statusbar_text = $gmStatusbar->get_statusbar_text($gm_statusbar_cat, $_GET["products_id"], $_SESSION["languages_id"]); if(!empty($gm_statusbar_text)){ ?>';var gm_statusbar_text="<?php echo addslashes($gm_statusbar_text); ?>";var gm_statusbar_speed=Number("<?php echo gm_get_conf('GM_STATUSBAR_SPEED'); ?>");var gm_statusbar_width=Number("<?php echo gm_get_conf('GM_STATUSBAR_WIDTH'); ?>");var gm_statusbar_length=gm_statusbar_text.length;var gm_statusbar_position=1-gm_statusbar_width;function gm_statusbar(){gm_statusbar_position++;var gm_statusbar_text_state="";if(gm_statusbar_position==gm_statusbar_length){gm_statusbar_position=1-gm_statusbar_width;}if(gm_statusbar_position<0){for(var gm_statusbar_counter=1;gm_statusbar_counter<=Math.abs(gm_statusbar_position);gm_statusbar_counter++){gm_statusbar_text_state=gm_statusbar_text_state+" ";}gm_statusbar_text_state=gm_statusbar_text_state+gm_statusbar_text.substring(0,gm_statusbar_width-gm_statusbar_counter+1);}else{gm_statusbar_text_state=gm_statusbar_text_state+gm_statusbar_text.substring(gm_statusbar_position,gm_statusbar_width+gm_statusbar_position);}window.status=gm_statusbar_text_state;setTimeout("gm_statusbar()",gm_statusbar_speed);}t_php_helper='<?php }else{ ?>';function gm_statusbar(){return true;}t_php_helper='<?php } ?>';
/*<?php
}
else
{
?>*/
t_php_helper = '<?php $gmStatusbar = MainFactory::create_object("GMStatusbar"); $gm_statusbar_cat = $_GET["cPath"]; if(strpos($gm_statusbar_cat, "_") !== false) $gm_statusbar_cat = substr(strrchr($gm_statusbar_cat, "_"), 1, strlen($gm_statusbar_cat)); $gm_statusbar_text = $gmStatusbar->get_statusbar_text($gm_statusbar_cat, $_GET["products_id"], $_SESSION["languages_id"]); if(!empty($gm_statusbar_text)){ ?>';
var gm_statusbar_text = "<?php echo addslashes($gm_statusbar_text); ?>";
var gm_statusbar_speed = Number("<?php echo gm_get_conf('GM_STATUSBAR_SPEED'); ?>");
var gm_statusbar_width = Number("<?php echo gm_get_conf('GM_STATUSBAR_WIDTH'); ?>");
var gm_statusbar_length = gm_statusbar_text.length;
var gm_statusbar_position = 1 - gm_statusbar_width;

function gm_statusbar()
{
	gm_statusbar_position++;
	var gm_statusbar_text_state="";
	if (gm_statusbar_position == gm_statusbar_length){
		gm_statusbar_position = 1 - gm_statusbar_width;
	}
	if (gm_statusbar_position < 0){
		for (var gm_statusbar_counter = 1; gm_statusbar_counter <= Math.abs(gm_statusbar_position); gm_statusbar_counter++){
			gm_statusbar_text_state = gm_statusbar_text_state + " ";
		};
		gm_statusbar_text_state = gm_statusbar_text_state + gm_statusbar_text.substring(0, gm_statusbar_width - gm_statusbar_counter + 1);
	}
	else{
		gm_statusbar_text_state = gm_statusbar_text_state + gm_statusbar_text.substring(gm_statusbar_position, gm_statusbar_width + gm_statusbar_position);
	}
	window.status = gm_statusbar_text_state;
	setTimeout("gm_statusbar()", gm_statusbar_speed);
}
t_php_helper = '<?php }else{ ?>';
function gm_statusbar()
{
	return true;
}
t_php_helper = '<?php } ?>';
/*<?php
}
?>*/
